package org.framework.lazy.cloud.network.heartbeat.protocol.auth;

import lombok.extern.slf4j.Slf4j;
import org.framework.lazy.cloud.network.heartbeat.protocol.properties.ProtocolProxyProperties;
import org.framework.lazy.cloud.network.heartbeat.protocol.token.AuthenticationTokenContext;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Slf4j
@Component
public class DefaultNettyPasswordAuth extends AbstractNettyPasswordAuth {

    @Override
    public boolean doVerify(String username, String password) {
        boolean verify = AuthenticationTokenContext.verify(username, password);
        if (!verify) {
            log.error("授权失败");
        }
        return verify;
    }

}
